'''
Created on 2009-8-14

@author: LiChao
'''
#from tools.handler404 import handler404
from django.shortcuts import redirect, render_to_response
from django.core.urlresolvers import reverse
from django.contrib.auth.decorators import login_required

def index(request):
    if request.user.is_authenticated():
        user = request.user
        return render_to_response('accounts/login_index.html', {'user':user})
    else:
        return redirect(reverse('account_login'))
